namespace FubuMVC.Core.Behaviors
{
    public abstract class behavior_base_for_convenience : IActionBehavior
    {
        public IActionBehavior InsideBehavior{ get; set; }

        public virtual void PrepareInput()
        {
        }

        public virtual void PerformInvoke()
        {
            InsideBehavior.Invoke();
        }

        public virtual void AfterInvocation()
        {
        }

        public void Invoke()
        {
            PrepareInput();
            PerformInvoke();
            AfterInvocation();
        }
    }
}